package com.wsj.web.form.member;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class PasswordForm extends ActionForm {

	private static final long serialVersionUID = 6234998016676493941L;
	
	private String old_pwd;
	private String new_pwd;
	private String confirm_pwd;
	
	
	
	
	@Override
	public void reset(ActionMapping arg0, HttpServletRequest arg1) {
		// TODO Auto-generated method stub
		
		super.reset(arg0, arg1);
	}
	@Override
	public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) {
		// TODO Auto-generated method stub
		ActionErrors actionErr = new ActionErrors();
		if(old_pwd.equals(""))actionErr.add("pwdErr",new ActionMessage("pwdErr"));
		if(!new_pwd.equals(confirm_pwd))actionErr.add("pwdErr",new ActionMessage("pwdErr"));
		return actionErr;
	}
	public String getConfirm_pwd() {
		return confirm_pwd;
	}
	public void setConfirm_pwd(String confirm_pwd) {
		this.confirm_pwd = confirm_pwd;
	}
	public String getNew_pwd() {
		return new_pwd;
	}
	public void setNew_pwd(String new_pwd) {
		this.new_pwd = new_pwd;
	}
	public String getOld_pwd() {
		return old_pwd;
	}
	public void setOld_pwd(String old_pwd) {
		this.old_pwd = old_pwd;
	}

}
